package com.hakim.wfb.customer.enums;

/**
 * 手续费类型
 * Created by zhile on 2017/3/29 0029.
 */
public enum FeeTypeEnum {
    ORDER("order", "每单订单计费"),
    TICKET("ticket", "每张票计费")
    ;

    private String code;

    private String message;

    FeeTypeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static FeeTypeEnum getByCode(String code) {
        FeeTypeEnum[] codes = values();
        for (FeeTypeEnum each : codes) {
            if (each.code.equals(code)) {
                return each;
            }
        }
        return null;
    }
}
